{__NOLAYOUT__}
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>新闻资讯-{$seo_title}</title>
    <include file="Index:meta" />
    <link href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/css/swiper.min.css" rel="stylesheet">
</head>

<body>
    <div id="page">
        <!-- Header -->
        <include file="Index:header" />
        <!-- Header End -->

        <div class="banner"><img src="__PUBLIC__/dist/image/rank_banner.jpg"></div>

        <div class="container pt-60 mb-60">
            
            <section class="new-main mb-60">
                <div class="list-aside">
                    <if condition = "$pid eq '26' " >
                    <h2>公告</h2>
                    <elseif  condition = "$pid eq '27' " />
                    <h2>文件</h2>
                    </if>
                    <ul id="mainul">
                    
                    </ul>
                </div>
                <a class="btn-more center-block" data-p='1'>加载更多</a>
            </section>

            <aside class="new-aside">
                
                <div class="list-aside">
                    <if condition = "$pid eq '27' " >
                        <a class="pull-right" href="index.php?m=Index&a=notice&pid=26">更多&gt;</a>
                        <h2>公告</h2>
                    <elseif  condition = "$pid eq '26' " />
                        <a class="pull-right"  href="index.php?m=Index&a=notice&pid=27">更多&gt;</a>
                        <h2>文件</h2>
                    </if>
                    <ul>
                        <volist name='rightblock' id="vo" key='k'>
                            <li class="text-ellipsis"><a href='index.php?m=Index&a=newsdetails&id={$vo.id}'>{$vo.title} </a></li>
                        </volist>
                    </ul>
                </div>
            </aside>
        </div>

        <include file="Index:footer" />
    </div>
    <script>
        var cc = {$pid} ;
        $(function () {   
            var i = 1;
            //加载更多
            $('.btn-more').on('click', function () {
                i = i + 1;
                refreshlist(cc, i);
            })
            
         })
         
         function refreshlist(aa, bb) {
            $.ajax({
                type: "POST",
                url: "index.php?g=Home&m=Index&a=getnotice",
                data: "catid=" + aa + "&page=" + bb,
                dataType: "json",
                success: function (resp) {
                    if (resp != null) {
                        var strHTML = '';
                        $.each(resp, function (k, item) {
                            strHTML += '<li class="text-ellipsis"><a href="index.php?m=Index&a=newsdetails&id='+item.id+'">'+item.title+'</a></li>';
                        });
                        $("#mainul").append(strHTML);
                    } else {
                        $(".btn-more").html('没有更多');
                    }
                }
            });
        }

        refreshlist(cc, 1);
    </script>
</body>
</html>